package com.net.oil.http;

/**
 * Created by lch on 2018/2/10 0010.
 * Email:245850413@qq.com
 */

public class AppUrl {

    /* 域名 */
    public static String BASE_URL = "http://oil.515oil.cn";

    /* 测试地址 */
//    public static String BASE_URL = "http://39.106.59.122";

    /* 图片地址 */
    private static String IMAGE_RUL = BASE_URL + "/resource/image/%s";

    /* 关于我们 */
//    public static String ABOUS_US = "file:///android_asset/user_protocal.html";
    public static String ABOUS_US = "http://oil.515oil.top/use-protocol.html";

    /* 官网地址 */
    public static String UCCN = "http://www.515oil.cn/m/";

    /**
     * 一键分享链接
     * @param invitationCode    邀请码，
     * @return 分享链接
     */
    public static String getShareUrl(String invitationCode){
        return "http://wxpub.515oil.top/h5/wechat/?515oil#/invite/register?i=" + invitationCode;
    }

    /**
     * 返回图片的完整路径
     *
     * @param result 图片资源
     * @return 服务器图片地址
     */
    public static String getImageUrl(String result) {
        return String.format(AppUrl.IMAGE_RUL, result);
    }
}
